import http from '@/utils/http';

export const getList = async (params) => {
  const resp = await http.get('/manager/list', { params });
  return resp;
};

export const getFrameList = async (params) => {
  const resp = await http.get('/manager-frame/list', { params });
  return resp;
};

export const getFrameDetail = async (params) => {
  const resp = await http.get('/manager-frame/detail', { params });
  return resp;
};

export const getDetail = async (params) => {
  const resp = await http.get('/manager/detail', { params });
  return resp;
};

export const create = async (data) => {
  const resp = await http.post('/manager/create', data);
  return resp;
};

export const update = async (data) => {
  const resp = await http.post('/manager/update', data);
  return resp;
};

export const deleteById = async (id) => {
  const resp = await http.post('/manager/delete', { id });
  return resp;
};

export default {
  getList,
  create,
  deleteById,
};
